<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<html>
  <head>
	 
  </head>
  
  <body>
   <h1 align="center">注册新用户</h1>
 	<hr/>
    <form action="add" method="post" align="center" name="myform" onsubmit="return check()">
	         <table align="center" >
			<tr>
				<td>用户名</td>
				<td><input  type="text" name="uname" /></td>
			</tr>
			<tr>
				<td>密码</td>
				<td><input type="password"  id="password" name="pwd"/ ></td></td>
			</tr>
			<tr>
				<td>确认密码</td>
				<td><input type="password"  id="confirm_password"/ ></td>
			</tr>
			<tr>
			<td colspan="2" align="center" >上传图片<input type="file"  /></td>
			</tr>
			<tr align="center">
				<td colspan="2"><input type="submit" value="提交"/></td>
			</tr>
		</table>
		
    </form>
     <script type="text/javascript">
		 function check(){
			 if(myform.password.value!=myform.confirm_password.value){
				 alert("密码不一样，请重新输入");
				 myform.password.focus();
				 return false;
			 }
		 }
		 </script>
  </body>
</html>